package com.kateba.android.blueinput;

import android.content.Context;
import android.graphics.Typeface;
import android.graphics.drawable.GradientDrawable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;
import android.widget.TableLayout;
import android.widget.TextView;

public class GUITab2 extends RelativeLayout
{
  public ImageButton[] m_IB = new ImageButton[2];
  public ListView m_lvAvailable;
  private int[] m_nIBImgs;

  public GUITab2(Context paramContext)
  {
    super(paramContext);
    int[] arrayOfInt1 = new int[2];
    arrayOfInt1[0] = 2130837512;
    arrayOfInt1[1] = 2130837515;
    this.m_nIBImgs = arrayOfInt1;
    int i = Singleton.getInstance().applySCRDensity(paramContext, Singleton.g_nSpacing);
    int j = Singleton.getInstance().applySCRDensity(paramContext, Singleton.g_nButPadding);
    setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
    setPadding(i, i, i, i);
    setBackgroundColor(Singleton.clrBackgroundApp);
    LinearLayout localLinearLayout1 = new LinearLayout(paramContext);
    localLinearLayout1.setId(34120);
    localLinearLayout1.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
    localLinearLayout1.setOrientation(0);
    localLinearLayout1.setPadding(0, i, 0, 0);
    LinearLayout localLinearLayout2 = new LinearLayout(paramContext);
    localLinearLayout2.setId(34121);
    localLinearLayout2.setBackgroundDrawable(getResources().getDrawable(2130837518));
    localLinearLayout2.setOrientation(0);
    localLinearLayout2.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
    localLinearLayout2.setPadding(i, i, i, i);
    for (int k = 0; ; k++)
    {
      if (k >= this.m_IB.length)
      {
        localLinearLayout1.addView(localLinearLayout2);
        RelativeLayout.LayoutParams localLayoutParams2 = new RelativeLayout.LayoutParams(-1, -2);
        localLayoutParams2.addRule(12);
        localLayoutParams2.addRule(14);
        addView(localLinearLayout1, localLayoutParams2);
        LinearLayout localLinearLayout3 = new LinearLayout(paramContext);
        localLinearLayout3.setBackgroundDrawable(getResources().getDrawable(2130837518));
        localLinearLayout3.setOrientation(1);
        localLinearLayout3.setPadding(i, i, i, i);
        RelativeLayout.LayoutParams localLayoutParams3 = new RelativeLayout.LayoutParams(-1, -2);
        localLayoutParams3.addRule(10);
        localLayoutParams3.addRule(14);
        localLayoutParams3.addRule(2, 34120);
        addView(localLinearLayout3, localLayoutParams3);
        TextView localTextView1 = new TextView(paramContext);
        localTextView1.setText(getResources().getString(2131034129));
        localTextView1.setTypeface(Typeface.DEFAULT, 1);
        localTextView1.setTextSize(2, Singleton.g_nTitleSize);
        localTextView1.setTextColor(Singleton.clrText);
        localTextView1.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
        localLinearLayout3.addView(localTextView1);
        ListView localListView1 = new ListView(paramContext);
        this.m_lvAvailable = localListView1;
        this.m_lvAvailable.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
        int[] arrayOfInt2 = new int[3];
        arrayOfInt2[0] = -1;
        arrayOfInt2[1] = -12303292;
        arrayOfInt2[2] = -1;
        ListView localListView2 = this.m_lvAvailable;
        GradientDrawable localGradientDrawable = new GradientDrawable(GradientDrawable.Orientation.RIGHT_LEFT, arrayOfInt2);
        localListView2.setDivider(localGradientDrawable);
        this.m_lvAvailable.setDividerHeight(1);
        this.m_lvAvailable.setFadingEdgeLength(0);
        localLinearLayout3.addView(this.m_lvAvailable);
        this.m_lvAvailable.setAdapter(null);
        TextView localTextView2 = new TextView(paramContext);
        localTextView2.setText(getResources().getString(2131034131));
        localTextView2.setTextSize(2, Singleton.g_nSubtitleSize);
        localTextView2.setTextColor(Singleton.clrSubText);
        localTextView2.setLayoutParams(new RelativeLayout.LayoutParams(-1, -2));
        localLinearLayout3.addView(localTextView2);
        return;
      }
      ImageButton[] arrayOfImageButton = this.m_IB;
      ImageButton localImageButton = new ImageButton(paramContext);
      arrayOfImageButton[k] = localImageButton;
      this.m_IB[k].setBackgroundDrawable(getResources().getDrawable(2130837519));
      this.m_IB[k].setImageDrawable(getResources().getDrawable(this.m_nIBImgs[k]));
      this.m_IB[k].setPadding(j, j, j, j);
      this.m_IB[k].setLayoutParams(new RelativeLayout.LayoutParams(-2, -2));
      this.m_IB[k].setOnClickListener((View.OnClickListener)paramContext);
      RelativeLayout localRelativeLayout = new RelativeLayout(paramContext);
      RelativeLayout.LayoutParams localLayoutParams1 = new RelativeLayout.LayoutParams(-2, -2);
      localLayoutParams1.addRule(13);
      localRelativeLayout.addView(this.m_IB[k], localLayoutParams1);
      localLinearLayout2.addView(localRelativeLayout, new TableLayout.LayoutParams(-1, -1, 1.0F));
    }
  }

  public GUITab2(Context paramContext, AttributeSet paramAttributeSet)
  {
    super(paramContext, paramAttributeSet);
    int[] arrayOfInt = new int[2];
    arrayOfInt[0] = 2130837512;
    arrayOfInt[1] = 2130837515;
    this.m_nIBImgs = arrayOfInt;
  }
}